package com.example.supermarket.model;

import java.math.BigDecimal;

/**
 * 水果枚举类，定义超市出售的水果及其价格
 */
public enum Fruit {
    APPLE("苹果", new BigDecimal("8.0")),
    STRAWBERRY("草莓", new BigDecimal("13.0")),
    MANGO("芒果", new BigDecimal("20.0"));

    private final String name;
    private final BigDecimal pricePerJian;

    Fruit(String name, BigDecimal pricePerJian) {
        this.name = name;
        this.pricePerJian = pricePerJian;
    }

    public String getName() {
        return name;
    }

    public BigDecimal getPricePerJian() {
        return pricePerJian;
    }
}